package com.tengju.bff.interfaces.covercharge.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

@Getter
@AllArgsConstructor
public enum TaskBizType {

    /**
     * 文件类
     */
    TYPE_1("1", "文件类"),

    TYPE_2("2", "数据类"),
    ;

    private String type;

    private String msg;


    public static TaskBizType getInstance(String type) {
        if (StringUtils.isBlank(type)) {
            return null;
        }
        for (TaskBizType taskBizType : TaskBizType.values()) {
            if (type.equals(taskBizType.getType())) {
                return taskBizType;
            }
        }
        return null;
    }

}
